package r21310.chap05.d1101;

import java.util.Scanner;

public class Demo01 {
    public static void main(String[] args) {
        System.out.println("请输入移动电话号码");
        Scanner sc=new Scanner(System.in);
        String phone=sc.next();
        if (checkPhoneNum(phone)){
            System.out.println("对");
        }else {
            System.out.println("不对");
        }

    }
    public static boolean checkPhoneNum(String str){
        boolean ret=true;
        if (str.length()==11){
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i)<0||str.charAt(i)>9){
                    ret=false;
                }
            }
        }else {
            ret=true;
        }
        return ret;
    }
}
